package top.dingwen.io.treasure.example.controller;

//import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.dingwen.io.treasure.base.exception.BaseRuntimeException;
import top.dingwen.io.treasure.webplus.result.Result;
import top.dingwen.io.treasure.webplus.web.controller.BaseViewController;

import javax.validation.Valid;

/**
 * 测试API
 *
 * @author dingwen
 * @since 2024/6/27 09:16
 */
//@EnableEncryptableProperties
@RestController
@Slf4j
@RequestMapping("/examples")
@Valid
public class ExampleController implements BaseViewController {


    /**
     * 案例首页
     * <p>
     * 测试外部国际化翻译
     * </p>
     *
     * @return {@link Result }<{@link String }> 通用结果
     */
    @GetMapping
    public Result<String> index() {
        throw new BaseRuntimeException(
                "examples",
                "test",
                "test",
                null,
                null
        );
    }
}
